<?php

namespace app\admin\controller;

use app\admin\model\Project;
use app\admin\model\Statistics;
use app\common\controller\Backend;

class Dashboard extends Backend
{
    public function initialize(): void
    {
        parent::initialize();
    }

    public function index(): void
    {
        $this->success('', [
            'remark' => get_route_remark(),
            'tongji' => (new Statistics())->tongji(),
        ]);
    }


    public function getProjectYearChart(): void
    {
        $this->success('', (new Statistics())->getProjectInCome());
    }

    public function getOtherYearChart(): void
    {
        $this->success('', (new Statistics())->getOtherPay());
    }

    public function getChannelYearChart(): void
    {
        $this->success('', (new Statistics())->getChannelIncome());
    }
}
